'''
* This is the projet for Brtc LlmOps Platform
* @Author Leon-liao <liaosiliang@alltman.com>
* @Description //TODO 
* @File: study_excel_operate_xlrd.py
* @Time: 2025/6/29
* @All Rights Reserve By Brtc
'''
import xlrd
work_book = xlrd.open_workbook('test.xls') # 打开  表格
sheet  = work_book.sheet_by_name("work") # 选择表

# 操作 数据
print(sheet.nrows)
print(sheet.ncols)

# 获取指定的行的数据
print(sheet.row_values(0))
print(sheet.row_values(2))

# 打印指定列的数据
print(sheet.col_values(0))
print(sheet.col_values(1))

# 打印指定的单元格
print(sheet.cell_value(0, 0))
print(sheet.cell_value(1, 1))